[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 fnmerge()               Make New File Name

 #include   <dir.h>

 void       fnmerge(path,drive,dir,name,ext);
 char       *path;                       Full name
 const char *drive;                      Drive
 const char *dir;                        Directory/subdirectory
 const char *name;                       File name
 const char *ext;                        File extension

    fnmerge() constructs a file name from the components 'drive', 'dir',
    'name' and 'ext', and stores the result in 'path'.  The new file's
    full path name is:

                     X:\DIR\SUBDIR\NAME.EXT

     where:
                X                  =  'drive'
                \DIR\SUBDIR\  =  'dir'
                NAME               =  'name'
                EXT                =  'ext'

    The maximum lengths of these components are determined by the
    following constants:

                MAXDRIVE       3   drive, including colon
                MAXDIR             66   dir, including leading and
                                        trailing backslashes
                MAXFILE             9   name
                MAXEXT              5   ext, including leading dot

    Each length also accomodates the NULL character for each component.

    fnmerge() assumes there is enough space for the constructed path
    name.  The maximum constructed length is 80, given by the constant
    MAXPATH.

       Returns:     There is no return value.

         Notes:     fnsplit() is the inverse of fnmerge(), so a 'path'
                    split with fnsplit(), then merged with fnmerge(),
                    results in 'path'.


See Also: fnsplit()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson